//
//  OrderDetailGoodCell.m
//  ai2ban
//
//  Created by Heartbeats on 2018/1/18.
//  Copyright © 2018年 mac book pro. All rights reserved.
//

#import "OrderDetailGoodCell.h"

@interface OrderDetailGoodCell()
@property (weak, nonatomic) IBOutlet UIImageView *productImgV;
@property (weak, nonatomic) IBOutlet UILabel *productName;
@property (weak, nonatomic) IBOutlet UILabel *productCount;
@property (weak, nonatomic) IBOutlet UILabel *productPrice;


@end

@implementation OrderDetailGoodCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];
}

- (void)setModel:(ProductModel *)model {
    _model = model;
    [self.productImgV sd_setImageWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@%@", ImageBaseUrl, model.picImg]]];
    self.productName.text = model.productName;
    self.productCount.text = [NSString stringWithFormat:@"x%@", model.productCount];
    if (self.isJiFenOrder) {
         self.productPrice.text = [NSString stringWithFormat:@"星豆:%@", model.productScore];
    }else {
        self.productPrice.text = [NSString stringWithFormat:@"¥%@", model.productPrice];
    }
}

@end
